﻿using Lis.DALFactory;
using Lis.Dto;
using Lis.IDAL;
using Lis.IRepository;
using Lis.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lis.Repository
{
    public class CirculateRepository : GenericRepository<LoanBookDto>, ICirculateRepository
    {
        public override void GetDal()
        {
            CurrentDal = AbstractDalFactory.GetCirculateDal();
        }

        public IEnumerable<LoanBookDto> GetEntitiesOfLoanByUserName(string userName)
        {
            return ((ICirculateDal)CurrentDal).GetEntitiesOfLoanByUserName(userName);
        }

        public IEnumerable<LoanBookDto> GetEntitiesOfLoanHistoryByUserName(string userName)
        {
            return ((ICirculateDal)CurrentDal).GetEntitiesOfLoanHistoryByUserName(userName);
        }
    }
}
